package com.king.hpeproject.constant;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * BusinessExceptionConstant 类描述
 *
 * @author xxx
 * @since 2025/8/16
 */
@AllArgsConstructor
@Getter
public enum BusinessExceptionConstant {
    URL_LIBRARY_NOT_FOUND(400, "URL-LIBRARY-ERR-001", "URL库不存在或没有操作权限"),
    URL_LIBRARY_ALREADY_REFERENCED(400, "URL-LIBRARY-ERR-002", "该URL库已被引用，不能删除"),

    URL_POLICY_NOT_FOUND(400, "URL-ERR-001", "URL策略不存在或没有操作权限"),
    URL_POLICY_ALREADY_REFERENCED(400, "URL-ERR-002", "该URL策略已被引用，不能删除"),

    APP_USAGE_TIME_POLICY_NOT_FOUND(400, "APP-USAGE-TIME-ERR-001", "应用使用时长策略不存在或没有操作权限"),
    APP_USAGE_TIME_POLICY_ALREADY_REFERENCED(400, "APP-USAGE-TIME-ERR-002", "该应用使用时长策略已被引用，不能删除"),

    DEVICE_USAGE_POLICY_NOT_FOUND(400, "DEVICE-USAGE-ERR-001", "设备使用策略不存在或没有操作权限"),
    DEVICE_USAGE_POLICY_ALREADY_REFERENCED(400, "DEVICE-USAGE-ERR-002", "该设备使用策略已被引用，不能删除"),

    APP_NOT_FOUND(400, "APP-ERR-001", "APPID不存在或没有操作权限"),

    POLICY_TEMPLATE_NOT_FOUND(400, "POLICY-TEMPLATE-ERR-001", "策略模板不存在或没有操作权限"),

    EMAIL_FORMAT_ERROR(400, "EMAIL-ERR-001", "邮箱格式错误"),
    EMAIL_ALREADY_USED(400, "EMAIL-ERR-002", "邮箱已被使用"),
    EMAIL_NOT_FOUND(400, "EMAIL-ERR-003", "邮箱不存在"),
    EMAIL_SEND_ERROR(400, "EMAIL-ERR-004", "发送邮箱失败，失败原因：%s"),
    EMAIL_ALREADY_SEND_ERROR(400, "EMAIL-ERR-005", "您在%s分钟内已发送过验证码，请稍后再试"),
    EMAIL_ALREADY_BIND(400, "EMAIL-ERR-006", "邮箱已绑定"),
    EMAIL_REPEAT_BIND_ERROR(400, "EMAIL-ERR-007", "新邮箱与原邮箱号相同，无需重复绑定"),
    EMAIL_VERIFICATION_CODE_ERROR(400, "EMAIL-ERR-008", "邮箱验证码错误"),
    EMAIL_SECOND_AUTH_TOKEN_ERROR(400, "EMAIL-ERR-009", "绑定新邮箱前请先完成二次认证"),
    EMAIL_TOKEN_ERROR(400, "EMAIL-ERR-010", "邮箱绑定失败，原因：token认证失败"),

    OPERATION_FREQUENCY_ERROR(400, "OPERATION-ERR-001", "操作频率过快，请%s秒后再试"),
    OPERATION_NO_SPECIFIED_PROJECT_ERROR(400, "OPERATION-ERR-002", "未指定项目，操作失败"),

    SECOND_AUTH_PASSWORD_ERROR(400, "PASSWORD-ERR-001", "密码错误"),

    ;

    /**
     * 状态码
     */
    private final int statusCode;

    /**
     * 业务错误码
     */
    private final String errCode;

    /**
     * 错误信息
     */
    private final String errMsg;
}
